{% extends 'base.html' %}
{% block content %}
<div class="right_col" role="main">
    <div class="">
        <div class="clearfix"></div>

        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="tabbable" id="tabs-754998">
                    <ul class="nav nav-tabs">
                        <li class="active">
                        <a href="#panel-single" data-toggle="tab">用户日志</a>
                        </li>
                    </ul>

                    <div class="x_panel" style="border-top:none;">
                <div class="panel-body">

        <div style="margin-bottom:10px;">

            <div class="col-sm-12">
                <table class="table table-hover table-bordered">
                  <thead>
                    <tr style="background-color: #f5f5f5;">

                      <th>时间</th>
                      <th>姓名</th>
                      <th>url</th>
                      <th>文件名</th>
                      <th>路径</th>
                    </tr>
                  </thead>
                  <tbody id="audit_table">
                {% for i in contacts %}
                    <tr name="tbody">
                      <td>{{ i.create_time|date:"Y-m-d H:i:s" }}</td>
                      <td>{{ i.user_name }}</td>
                      <td>{{ i.url_title }}</td>
                      <td>{{ i.file_name }}</td>
                      <td>{{ i.up_path }}</td>
                    </tr>
                  {% endfor %}
                  </tbody>
                </table>


            </div>
            <!--分页操作-->

            <div>
                 <ul class="pagination">共{{ num_pages }}页 {{ count }}条记录</ul>

                <nav aria-label="Page navigation">
                    <ul class="pagination">
                            {% if contacts.has_previous %}
                            <li>
                                <a href="/op/userlog?page={{ contacts.previous_page_number }}" aria-label="Previous">
                                    <span aria-hidden="true">&laquo;上一页 </span>
                                </a>
                            </li>
                                {% endif %}

                        {% for pg in page_range %}
                            {% if contacts.number == pg %}
                                <li class="active"><a href="/op/userlog?page={{ pg }}">{{ pg }}</a></li>
                            {% else %}
                                <li><a href="/op/userlog?page={{ pg }}">{{ pg }}</a></li>
                            {% endif %}
                        {% endfor %}
                        {% if contacts.has_next %}
                            <li>
                                <a href="/op/userlog?page={{ contacts.next_page_number }}" aria-label="Next">
                                    <span aria-hidden="true">&raquo;下一页</span>
                                </a>

                            </li>
                            {% endif %}

                        </span>
                    </ul>
                </nav>
            <!--</div>-->


        </div>
  </div>
</div>

                </div>

            </div>
        </div>
    </div>
</div>
{% endblock %}